package com.si.entite;

public class Tour extends Piece{
	String pathImage1= "./src/com/ChessApps/images/1.gif";
        String pathImage2= "./src/com/ChessApps/images/7.gif";

    
        
	public Tour(String couleur)
	{this.couleur= couleur;
		
	}

	@Override
	public boolean validerDep(Position posDepart, Position posFinal) {
		int diffColonne= posFinal.x-posDepart.x;
		int diffLigne= posFinal.y-posDepart.y;
		if(this.validerEchec(posFinal)){
		if (((diffLigne==0)&&(diffColonne!=0))||((diffLigne!=0)&&(diffColonne==0)))
			return true;
		return false;
	}else 
                    return false;
        }


	public boolean manger(Position posDepart, Position posFinal) {
		// TODO Auto-generated method stub
		return false;
	}
        
        @Override
    public String getPathImage(int i) {
       if (i== 1)
        {
            return pathImage1;
        }
        else {return pathImage2;}
        }

public String toString(){return "Tour";}
}
